from typedef cimport *
from factory cimport *
from base cimport *

cdef extern from 'stdafx.h':
    ctypedef struct ILvDataSetObserverVtbl:
        long AddRef(ILvDataSetObserver* this)
        long Release(ILvDataSetObserver* this)
        void OnFinalRelease(ILvDataSetObserver* this)
        void onChanged(ILvDataSetObserver* this)
        void onInvalidated(ILvDataSetObserver* this)
        void OnItemChanged(ILvDataSetObserver* this, int iItem)

    ctypedef struct ILvDataSetObserver: # (IObjRef)
        ILvDataSetObserverVtbl* lpVtbl

    ctypedef struct ILvAdapterVtbl:
        long __stdcall AddRef(ILvAdapter* this)
        long __stdcall Release(ILvAdapter* this)
        void __stdcall OnFinalRelease(ILvAdapter* this)
        void __stdcall registerDataSetObserver(ILvAdapter* this, ILvDataSetObserver* observer)
        void __stdcall unregisterDataSetObserver(ILvAdapter* this, ILvDataSetObserver* observer)
        int __stdcall getCount(ILvAdapter* this)
        void __stdcall getView(ILvAdapter* this, int position, IWindow*pItem, IXmlNode*xmlTemplate)
        int __stdcall getItemViewType(ILvAdapter* this, int position, DWORD dwState)
        int __stdcall getViewTypeCount(ILvAdapter* this)
        void __stdcall getViewDesiredSize(ILvAdapter* this, SIZE* pSize, int position, IWindow*pItem, int wid, int hei)
        BOOL __stdcall isEmpty(ILvAdapter* this)
        void __stdcall getItemDesc(ILvAdapter* this, int positoin, IStringW*pDesc)
        void __stdcall InitByTemplate(ILvAdapter* this, IXmlNode* xmlTemplate)
        HRESULT __stdcall QueryInterface(ILvAdapter* this, REFGUID id, IObjRef**ppObj)

    ctypedef struct ILvAdapter: # (IObjRef)
        ILvAdapterVtbl* lpVtbl

    ctypedef struct IMcAdapterVtbl:
        long __stdcall AddRef(IMcAdapter* this)
        long __stdcall Release(IMcAdapter* this)
        void __stdcall OnFinalRelease(IMcAdapter* this)
        void __stdcall registerDataSetObserver(IMcAdapter* this, ILvDataSetObserver* observer)
        void __stdcall unregisterDataSetObserver(IMcAdapter* this, ILvDataSetObserver* observer)
        int __stdcall getCount(IMcAdapter* this)
        void __stdcall getView(IMcAdapter* this, int position, IWindow*pItem, IXmlNode*xmlTemplate)
        int __stdcall getItemViewType(IMcAdapter* this, int position, DWORD dwState)
        int __stdcall getViewTypeCount(IMcAdapter* this)
        void __stdcall getViewDesiredSize(IMcAdapter* this, SIZE* pSize, int position, IWindow*pItem, int wid, int hei)
        BOOL __stdcall isEmpty(IMcAdapter* this)
        void __stdcall getItemDesc(IMcAdapter* this, int positoin, IStringW*pDesc)
        void __stdcall InitByTemplate(IMcAdapter* this, IXmlNode* xmlTemplate)
        HRESULT __stdcall QueryInterface(IMcAdapter* this, REFGUID id, IObjRef**ppObj)
        void __stdcall GetColumnName(IMcAdapter* this, int iCol, IStringW*pName)
        BOOL __stdcall IsColumnVisible(IMcAdapter* this, int iCol)
        BOOL __stdcall OnSort(IMcAdapter* this, int iCol, UINT*pFmts, int nCols)

    ctypedef struct IMcAdapter: # (ILvAdapter)
        IMcAdapterVtbl* lpVtbl

    ctypedef struct ITvDataSetObserverVtbl:
        pass

    ctypedef struct ITvDataSetObserver: # (IObjRef)
        ITvDataSetObserverVtbl* lpVtbl

    ctypedef struct ITvAdapterVtbl:
        pass

    ctypedef struct ITvAdapter: # (IObjRef)
        ITvAdapterVtbl* lpVtbl